function export_result(RS, scale_vec, xl, fig_title, lr, lr_target, folder_tex_cf)

% figure settings
scrsz = get(0,'ScreenSize');
set(0,'defaulttextinterpreter','latex')
set(0,'defaultaxesfontname','times')
set(0,'DefaultAxesFontSize',29); 
set(0,'DefaultTextFontSize',35);
set(0,'DefaultAxesTitleFontWeight','bold');

% font size
fs1 = 42;

% colors
color1 = 'k';
color2 = [0.3 0.3 0.3]; % light gray

% marker
marker_size = 18; 
ms = 'o';

% line
ls = ':';
l_width  = 3;
l_width2 = 2;

% set x-axis ticks. 
ns = length(scale_vec);
if lr==0
    ii = find(scale_vec==1); % baseline value 
elseif lr==1
    ii = find(scale_vec==lr_target); % baseline value 
end

i_vec = find(scale_vec>=0.5 & scale_vec<=2);
xtick_set = i_vec;
xtick_label = num2cell(scale_vec);
xtick_label = xtick_label(xtick_set,:);
xtick_set = 1:length(xtick_label);

xl = 'cost ($c^1_{jk}$) multiplier';

% horizontal line at 0
y0 = zeros(size(i_vec));

%% prices
fig_position = scrsz./[1.5 1.5 4 3];
fig = figure('Color','w','Position',fig_position);
ly = 1.2*min(RS.p1_vec(i_vec));
uy = 1.4*max(RS.p1_vec(i_vec));
hold on
plot(RS.p1_vec(i_vec),...
    'Color',color1,'linewidth',l_width,...
    'marker',ms,'markeredgecolor',color1,'markerfacecolor',[1 1 1],'markersize',marker_size);
ylabel('\% change', 'Interpreter','Latex')
plot(y0, 'linestyle', ls, 'Color', color2, 'linewidth',l_width2)
xlabel(xl,'Interpreter','Latex')
set(gca,'Xtick', xtick_set, 'XTickLabel', xtick_label);
title('\% change in initial rate, $p_{j1}$', 'Interpreter', 'Latex', 'FontSize', fs1);
xlim([0.7*min(xtick_set) 1.1*max(xtick_set)])
ylim([ly uy])
print('-depsc2',[fullfile(folder_tex_cf, 'cf_p1') '.eps']);

ly = 1.5*min(RS.p2_vec(i_vec));
uy = 1.3*max(RS.p2_vec(i_vec));
fig = figure('Color','w','Position',fig_position);
hold on
plot(RS.p2_vec(i_vec),...
    'Color',color1,'linewidth',l_width,...
    'marker',ms,'markeredgecolor',color1,'markerfacecolor',[1 1 1],'markersize',marker_size);
ylabel('\% change', 'Interpreter','Latex')
plot(y0, 'linestyle', ls, 'Color', color2, 'linewidth',l_width2)
xlabel(xl,'Interpreter','Latex')
set(gca,'Xtick', xtick_set, 'XTickLabel', xtick_label);
title('\% change in revised rate, $p_{jk2}$', 'Interpreter','Latex', 'FontSize', fs1)
ylim([ly uy])
xlim([0.7*min(xtick_set) 1.1*max(xtick_set)])
print('-depsc2',[fullfile(folder_tex_cf, 'cf_p2') '.eps']);

%% n_insurer
ly = 2*min(RS.n_vec(i_vec));
uy = 1.3*max(RS.n_vec(i_vec));

fig = figure('Color','w','Position',fig_position);
hold on
plot(RS.n_vec(i_vec),...
    'Color',color1,'linewidth',l_width,...
    'marker',ms,'markeredgecolor',color1,'markerfacecolor',[1 1 1],'markersize',marker_size);
ylabel('\% change', 'Interpreter','Latex')
plot(y0, 'linestyle', ls, 'Color', color2, 'linewidth',l_width2)
xlabel(xl,'Interpreter','Latex')
set(gca,'Xtick', xtick_set, 'XTickLabel', xtick_label);
title('\% change in \# of fringe entrants', 'Interpreter','Latex', 'FontSize', fs1)
ylim([ly uy])
xlim([0.7*min(xtick_set) 1.1*max(xtick_set)])
print('-depsc2',[fullfile(folder_tex_cf, 'cf_n') '.eps']);

%% profits 
ly = 1.5*min(RS.profit_major(i_vec));
uy = 1.3*max(RS.profit_major(i_vec));
fig = figure('Color','w','Position',fig_position);
hold on
plot(RS.profit_major(i_vec),...
    'Color',color1,'linewidth',l_width,...
    'marker',ms,'markeredgecolor',color1,'markerfacecolor',[1 1 1],'markersize',marker_size);
ylabel('\% change', 'Interpreter','Latex')
plot(y0, 'linestyle', ls, 'Color', color2, 'linewidth',l_width2)
xlabel(xl,'Interpreter','Latex')
set(gca,'Xtick', xtick_set, 'XTickLabel', xtick_label);
title('\% change in major firm profit','Interpreter','Latex', 'FontSize', fs1)
ylim([ly uy])
xlim([0.7*min(xtick_set) 1.1*max(xtick_set)])
print('-depsc2',[fullfile(folder_tex_cf, 'cf_w_m') '.eps']);

ly = 2*min(RS.profit_minor(i_vec));
uy = 1.2*max(RS.profit_minor(i_vec));
fig = figure('Color','w','Position',fig_position);
hold on
plot(RS.profit_minor(i_vec),...
    'Color',color1,'linewidth',l_width,...
    'marker',ms,'markeredgecolor',color1,'markerfacecolor',[1 1 1],'markersize',marker_size);
ylabel('\% change', 'Interpreter','Latex')
plot(y0, 'linestyle', ls, 'Color', color2, 'linewidth',l_width2)
xlabel(xl,'Interpreter','Latex')
set(gca,'Xtick', xtick_set, 'XTickLabel', xtick_label);
title('\% change in fringe profit','Interpreter','Latex', 'FontSize', fs1)
ylim([ly uy])
xlim([0.7*min(xtick_set) 1.1*max(xtick_set)])
print('-depsc2',[fullfile(folder_tex_cf, 'cf_w_f') '.eps']);

%% consumer welfare & enrollment
ly = -1.3*max(abs(RS.welfare_vec(i_vec)));
uy = 0.8*max(abs(RS.welfare_vec(i_vec)));
fig = figure('Color','w','Position',fig_position);
hold on
plot(RS.welfare_vec(i_vec),...
    'Color',color1,'linewidth',l_width,...
    'marker',ms,'markeredgecolor',color1,'markerfacecolor',[1 1 1],'markersize',marker_size);
ylabel('\% change', 'Interpreter','Latex')
plot(y0, 'linestyle', ls, 'Color', color2, 'linewidth',l_width2)
xlabel(xl,'Interpreter','Latex')
set(gca,'Xtick', xtick_set, 'XTickLabel', xtick_label);
title('\% change in consumer welfare','Interpreter','Latex', 'FontSize', fs1)
ylim([ly uy])
xlim([0.7*min(xtick_set) 1.1*max(xtick_set)])
print('-depsc2',[fullfile(folder_tex_cf, 'cf_w_c') '.eps']);

ly = -1.2*max(abs(RS.enroll_vec(i_vec)));
uy = 1.35*max(RS.enroll_vec(i_vec));
fig = figure('Color','w','Position',fig_position);
hold on
plot(RS.enroll_vec(i_vec),...
    'Color',color1,'linewidth',l_width,...
    'marker',ms,'markeredgecolor',color1,'markerfacecolor',[1 1 1],'markersize',marker_size);
ylabel('\% change', 'Interpreter','Latex')
plot(y0, 'linestyle', ls, 'Color', color2, 'linewidth',l_width2)
xlabel(xl,'Interpreter','Latex')
set(gca,'Xtick', xtick_set, 'XTickLabel', xtick_label);
title('\% change in privately insured rate', 'Interpreter','Latex', 'FontSize', fs1)
ylim([ly uy])
xlim([0.7*min(xtick_set) 1.1*max(xtick_set)])
print('-depsc2',[fullfile(folder_tex_cf, 'cf_insured') '.eps']);
